import XLSX from 'xlsx'
export default function (userCheckList, fileName) {
    let list = userCheckList; //表格中的数据
    let tableData = [
        ["姓名", "政治面貌", "签到时间", "签到情况"] //导出表头
    ]; // 表格表头
    list.forEach(item => {
        let rowData = [];
        //导出内容的字段
        rowData = [item.userVo.userName, item.userVo.userIdentity, item.checkTime, "已签到"];
        tableData.push(rowData);
    });
    let ws = XLSX.utils.aoa_to_sheet(tableData);
    let wb = XLSX.utils.book_new();
    XLSX.utils.book_append_sheet(wb, ws, "统计");
    XLSX.writeFile(wb, fileName + ".xlsx"); // 保存的文件名
}